<!DOCTYPE HTML>
<html>
    <head>
        <meta charset="utf-8" />
        <title>购物车-{eyou:global name='web_name' /}</title>
        <meta name="renderer" content="webkit">
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport" />
        <link href="{eyou:global name='web_cmspath'/}/favicon.ico" rel="shortcut icon" type="image/x-icon" />
        {eyou:static file="users/skin/css/bootstrap.min.css"/}
        {eyou:static file="users/skin/css/basic.css"/}
        {eyou:static file="users/skin/css/eyoucms.css"/}
        <!-- 新样式 2020-12-8 -->
        {eyou:static file="users/skin/css/element/index.css" /}
        {eyou:static file="users/skin/css/e-user.css" /}
        {eyou:include file="users/skin/css/diy_css.htm"/}

        {eyou:static file="/public/static/common/js/jquery.min.js"/}
        {eyou:static file="/public/plugins/layer-v3.1.0/layer.js"/}
        {eyou:static file="/public/static/common/js/tag_global.js"/}
        {eyou:static file="/public/static/common/js/mobile_global.js"/}
    </head>

    <body>
        {eyou:include file="users/users_header.htm" /}
        <div class="ey-header-status">
            <div class="header-status-l"><a href="javascript:history.go(-1)"><i class="el-icon-arrow-left"></i></a></div>
            <div class="header-status-m">购物车</div> 
            <div class="header-status-r">{eyou:spcart}<span id="management-button">管理</span>{eyou:else /}{/eyou:spcart}</div>
        </div>

        <div class="h50"></div>
        <div class="ey-container">
            <div class="el-row">
                <div class="goods-con">
                    {eyou:spcart id="field" pagesize="5"}
                        {eyou:spordergoods id="field2"}
                        <div class="cart-goods" {$field2.ProductId}>
                            <div class="goods-wrap">
                                <div class="iconfont icon-yuan_checked color-base-text">
                                    <label class="checkbox-label car-checkbox">
                                        <span></span>
                                        <input class="checkbox" type="checkbox" {$field2.CartChecked}>
                                        <span class="check-mark" style="top: -15px;"></span>
                                    </label>
                                    {$field2.hidden}
                                </div>
                                <div class="goods-img">
                                    <a href="{$field2.arcurl}">
                                       <img src="{$field2.litpic}">
                                    </a>
                                </div>
                                <div class="goods-info">
                                    <div>
                                        <div class="goods-name"><a href="{$field2.arcurl}">{$field2.title}<span style="color: red;">{$field2.StatusMark}</span></a></div>
                                        <div class="sku-wrap">
                                            {eyou:volist name='$field2.product_spec_list' id='spec' limt='0,3'}
                                            <div class="sku">
                                                {$spec.value}
                                            </div>
                                            {/eyou:volist}
                                        </div>
                                    </div>
                                    <div class="goods-sub-section">
                                        <div class="goods-price">
                                            <div class="bottom-price price-style large">
                                                <span class="unit">¥</span><span {$field2.UsersPriceId}>{$field2.users_price}</span>
                                            </div>
                                            <div class="bottom-price price-style large" style="display: none;">
                                                <span class="unit">¥</span><span {$field2.SubTotalId}>{$field2.subtotal}</span>
                                            </div>
                                        </div>
                                        <div class="numbox small">
                                            <div class="el-input-number el-input-number--mini">
                                                <span role="button" class="el-input-number__decrease" {$field2.ReduceQuantity}>
                                                    <i class="el-icon-minus"></i>
                                                </span>
                                                <span role="button" class="el-input-number__increase" {$field2.IncreaseQuantity}>
                                                    <i class="el-icon-plus"></i>
                                                </span>
                                                <div class="el-input el-input--mini">
                                                    <input type="text"  class="el-input__inner" {$field2.UpdateQuantity}>
                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                            </div>
                        </div>
                        {/eyou:spordergoods}
                        <div class="h50"></div>
                        <div class="shopcar-footer">
                            <div class="shopcar-footer-l">
                                <label class="checkbox-label car-checkbox2">
                                    <span>全选</span>
                                    <input class="checkbox" type="checkbox" {$field.InputChecked}>
                                    <span class="check-mark"></span>
                                </label>
                                {$field.InputHidden}
                            </div>
                            <div class="shopcar-footer-r related-content">
                                <a class="el-button el-button--primary is-round el-button--small" href="JavaScript:void(0);" {$field.selectCartDel}>删除( <span id="TotalNumberDel">{$field.TotalNumber}</span>)</a>
                            </div>
                            <div class="shopcar-footer-r related-content-no">
                                <span class="freight">不含运费</span>
                                <span class="price">共<span class="mr0" {$field.TotalNumberId}>{$field.TotalNumber}</span>件商品   合计:<i>￥</i><em class="red" {$field.TotalAmountId}>{$field.TotalAmount}</em></span>
                                <a class="el-button el-button--primary is-round el-button--small" href="JavaScript:void(0);" {$field.SubmitOrder}>结算</a>
                            </div>
                        </div>
                        {$field.hidden}
                    {eyou:else /}
                        <!-- 订单数据为空 -->
                        
                        <div class="ey-row min-hg-c-102 flex flex-center">
                            <div class="tc mt-50">
                                <p class=""><img id='litpic_img' src="{eyou:static file='users/skin/images/null-data.png' /}"/></p>
                                <a href="{eyou:global name='web_cmsurl' /}" class="el-button el-button--default"><i class="el-icon-shopping-cart-full"></i> 马上去购物</a>
                            </div>
                        </div>
                    {/eyou:spcart}
                </div>
                <!-- 中部结束 -->
            </div>
        </div>

        <!-- 购物车JS事件 -->
        <script type="text/javascript">
            // 管理相关
            const managementButton = $('#management-button');
            const relatedContent = $('.related-content');
            const relatedContentno = $('.related-content-no');
            function handleClick() {
                if (relatedContent.is(':hidden')) {
                    relatedContent.show();
                    relatedContentno.hide();
                    managementButton.text('完成');
                } else {
                    relatedContent.hide();
                    relatedContentno.show();
                    managementButton.text('管理');
                }
            }
            managementButton.on('click', handleClick);
        </script>
    </body>
</html>